package cn.epsilon3.service.twoFactorAuthentication;

import cn.epsilon3.common.Result;
import cn.epsilon3.domain.e3.vo.E3BindEmailVO;
import cn.epsilon3.domain.e3.vo.E3SendEmailVO;
import cn.epsilon3.domain.e3.vo.E3VerifyAuthenticatorCodeVO;
import cn.epsilon3.domain.e3.vo.E3VerifyEmailCodeVO;

/**
 * @description 2FA服务
 *
 * @author: epsilon3
 * @date: 2023/8/25 23:49
 */
public interface E32FAService {

    /**
     * 检查是否绑定邮箱
     *
     * @return
     */
    Result<String> e3CheckBindEmail();

    /**
     * 绑定邮箱
     *
     * @return
     */
    Result<String> e3BindEmail(E3BindEmailVO e3BindEmailVO);

    /**
     * 发送绑定邮箱验证码
     *
     * @return
     */
    Result<String> e3SendBindEmail(E3SendEmailVO e3SendEmailVO);

    /**
     * 验证邮箱验证码
     *
     * @return
     */
    Result<String> e3VerifyEmailCode(E3VerifyEmailCodeVO e3VerifyEmailCodeVO);

    /**
     * 检查是否绑定验证器
     *
     * @return
     */
    Result<Object> e3CheckAuthenticator();

    /**
     * 绑定验证器
     *
     * @return
     */
    Result<String> e3BindAuthenticator(E3VerifyAuthenticatorCodeVO e3VerifyAuthenticatorCodeVO);

    /**
     * 需要二步验证的操作  校验动态验证码
     *
     * @param code 验证码
     * @return 验证结果
     */
    Result<String> verifyOpe2Fa(String code);
}
